﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Logic.ClarizenSvc;

namespace Logic.ClarizenObjects
{
    public class EnhancementRequest : BaseObject
    {
        public EnhancementRequest(GenericEntity entity)
            : base(entity)
        {

        }

        public EnhancementRequest()
        {
        }

        public GenericEntity Importance
        {
            get;
            set;
        }
        [Clarizen]
        public String ImportanceID
        {
            set { this.Importance = new Severity { ID = new EntityId { TypeName = "Severity", Value = value } }.ToGenericEntity(); }
            get { return this.Importance != null && this.Importance.Id != null ? this.Importance.Id.Value : null; }
        }

        public GenericEntity OriginatedFrom
        {
            get;
            set;
        }
        [Clarizen]
        public String OriginatedFromID
        {
            set { this.OriginatedFrom = new WorkItem { ID = new EntityId { TypeName = "WorkItem", Value = value } }.ToGenericEntity(); }
            get { return this.OriginatedFrom != null && this.OriginatedFrom.Id != null ? this.OriginatedFrom.Id.Value : null; }
        }

        public GenericEntity AssignedTo
        {
            get;
            set;
        }
        [Clarizen]
        public String AssignedToID
        {
            set { this.AssignedTo = new User { ID = new EntityId { TypeName = "User", Value = value } }.ToGenericEntity(); }
            get { return this.AssignedTo != null && this.AssignedTo.Id != null ? this.AssignedTo.Id.Value : null; }
        }

        public String Title { get; set; }
        public DateTime? DueDate { get; set; }
        public int? Priority { get; set; }
        public Boolean ReportedbyCustomer { get; set; }
        public Boolean Mandatory { get; set; }
        public String Description { get; set; }
        public String ExpectedBusinessValue { get; set; }
        public String BusinessAlignment { get; set; }
    }
}
